Skip to content

Conversation

@jprakash-db
Copy link
Collaborator

@jprakash-db jprakash-db commented May 19, 2025

Description

This pull request adds native support for complex types—specifically, ARRAY and MAP in Databricks SQLAlchemy. It introduces new custom types, DatabricksArray and DatabricksMap enabling users to define, insert, and query columns of these types using SQLAlchemy models.

Pandas being one of the most important use cases for SQLAlchemy, additional testing has been added to test for Pandas specific use cases.

Usages

DatabricksArray

DatabricksArray is a compound type that can have multiple nested types within it.
Ex - DatabricksArray(DatabricksArray(String)) , DatabricksArray(String)

DatabricksMap

DatabricksArray is a compound type that can have multiple nested types in both the key and value space.
Ex - DatabricksMap(String,DatabricksArray(String)) , DatabricksMap(String,Integer)

Testing

Added new unit tests and e2e tests for DatabricksArray and DatabricksMap covering:

  • Table creation (DDL)
  • Data insertion and retrieval via ORM and pandas
  • Parsing/compilation of types including nested types
  • Data comparison and round-trip correctness

Note to reviewer

Kindly ignore the failing Integration tests, they will be fixed after some server side changes

@jprakash-db jprakash-db self-assigned this May 19, 2025
@jprakash-db jprakash-db requested a review from gopalldb June 17, 2025 08:10
@jprakash-db jprakash-db merged commit 4474d5d into main Jun 23, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants